home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tbav503.zip / TBSCANX.DOC < prev    next >
Text File  |  1992-12-29  |  39KB  |  1,201 lines

  1.  
  2.  
  3.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  4.  
  5.  
  6.                                Table of Contents
  7.  
  8.  
  9.     1. INTRODUCTION...................................... 2
  10.         1.1. Purpose of TbScanX.......................... 2
  11.         1.2. A Quick start............................... 3
  12.         1.3. Benefits.................................... 3
  13.  
  14.     2. USAGE OF THE PROGRAM.............................. 5
  15.         2.1. System requirements......................... 5
  16.         2.2. Program invocation.......................... 5
  17.             2.2.1. Invocation in Config.Sys.............. 6
  18.             2.2.2. Invocation in network environment..... 6
  19.             2.2.3. Invocation when using MS-Windows...... 6
  20.         2.3. While scanning.............................. 6
  21.         2.4. Detecting viruses........................... 6
  22.         2.5. Testing for viruses......................... 7
  23.         2.6. Command line options........................ 7
  24.             2.6.1. help ................................. 8
  25.             2.6.2. off .................................. 8
  26.             2.6.3. on ................................... 8
  27.             2.6.4. remove ............................... 8
  28.             2.6.5. compatx .............................. 8
  29.             2.6.6. data ................................. 9
  30.             2.6.7. noexec ............................... 9
  31.             2.6.8. allexec .............................. 9
  32.             2.6.9. noboot ............................... 9
  33.             2.6.10. valid ............................... 9
  34.             2.6.11. secure ............................. 10
  35.             2.6.12. lock ............................... 10
  36.             2.6.13. verbose ............................ 10
  37.             2.6.14. ems ................................ 10
  38.             2.6.15. xms ................................ 10
  39.             2.6.16. herchalf ........................... 10
  40.             2.6.17. hercfull ........................... 11
  41.             2.6.18. cga ................................ 11
  42.         2.7. Examples:.................................. 11
  43.         2.8. Residence of the signature file............ 11
  44.         2.9. Error messages............................. 11
  45.  
  46.     3. CONSIDERATIONS AND RECOMMENDATIONS............... 13
  47.         3.1. Solving incompatibility problems........... 13
  48.         3.2. Reducing the memory requirements........... 14
  49.         3.3. How many viruses does it detect?........... 15
  50.         3.4. Testing the scanner........................ 15
  51.  
  52.     4. APPLICATION INTERFACE............................ 17
  53.         4.1. High-level control......................... 17
  54.         4.2. Low-level control.......................... 17
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                      Page i
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.                                      Page 1
  122.  
  123.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  124.  
  125.  
  126. 1.  INTRODUCTION
  127.  
  128.  
  129.   1.1.  Purpose of TbScanX
  130.  
  131.     TbScanX is a virus scanner: it has been specifically developed to
  132.     detect viruses, Trojan Horses and other such threats to your
  133.     valuable data.
  134.  
  135.     A virus scanner is a program that is able to search a virus
  136.     signature that has been determined beforehand.  Most viruses
  137.     consist of a unique sequence of instructions, called a signature,
  138.     so by means of checking for the appearance of this signature in a
  139.     file we can see whether or not a program has been infected.
  140.  
  141.     By searching all your program files for the signatures of all
  142.     viruses already identified you can easily find whether your system
  143.     has been infected and, if that is the case, with which virus.
  144.  
  145.     Every PC owner should use a virus scanner frequently. It is the least
  146.     he or she can do to avoid possible damage caused by a virus.
  147.  
  148.     By now already many virus scanners have been developed. The problem
  149.     with all these scanners is that you have to execute them. Suppose
  150.     you have the virus scanner automatically invoked in your
  151.     autoexec.bat file. If no viruses are found, your system is supposed
  152.     to be uninfected. But, to be sure that no virus can infect your
  153.     system, you have to run the scanner every time before you copy a
  154.     file to your harddisk, after downloading a file from a bulletin
  155.     board system, or after unarchiving an archive such as a ZIP file.
  156.     Be honest, do YOU actually invoke your scanner every time you
  157.     introduce a new file into the system?  If you don't, you take the
  158.     risk that within a couple of hours all files are infected by a
  159.     virus...
  160.  
  161.     TbScanX has a unique feature to overcome this tedious scanning.
  162.     Once invoked it will remain resident in memory, and AUTOMATICALLY
  163.     scan all files you execute, copy, download, modify, or unarchive!
  164.  
  165.     The same approach is used to protect against bootsector viruses:
  166.     Every time you put a diskette into a drive the bootsector will be
  167.     scanned. If the disk is contaminated with a boot sector virus
  168.     TbScanX will warn you!
  169.  
  170.     Probably you think that a resident virus scanner consumes much
  171.     memory, makes your system slow, and is a source of many problems.
  172.     But, if you already know our shareware scanner TBSCAN, you know
  173.     that this scanner can scan your files faster than any other
  174.     scanner. Also TbScanX achieves a lightning fast speed. Actually,
  175.     TbScanX is a lot faster, since it will not access your disk to scan
  176.     the files, because all files to be created or modified reside
  177.     already in memory! TbScanX just monitors every byte going to any
  178.  
  179.  
  180.  
  181.                                      Page 2
  182.  
  183.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  184.  
  185.  
  186.     executable file on the harddisk.
  187.  
  188.     The amount of memory used depends on the number of signatures. With
  189.     all features enabled TbScanX uses 10Kb of memory when scanning for
  190.     360 family signatures. If you enable swapping TbScanX normally uses
  191.     only 1Kb of memory. You can swap to EMS, XMS or even unused video
  192.     memory. Of course the remaining kilobyte of TbScanX can be loaded
  193.     in upper memory.
  194.  
  195.  
  196.   1.2.  A Quick start
  197.  
  198.     Although we highly recommend a complete reading of this manual, here
  199.     are some directions for a quick run of TbScanX:
  200.  
  201.     Load TbDriver first if it is not yet loaded. Type "TbDriver" and
  202.     press return.
  203.     To load TbScanX type "TbScanX" and press return.
  204.  
  205.     The invocation syntax is:
  206.             TBSCANX [<options>]...
  207.  
  208.     For fast online help type "TbScanX ?" or "TbScanX help".
  209.  
  210.  
  211.   1.3.  Benefits
  212.  
  213.     By now many different virus scanners have been developed.  However,
  214.     TbScanX has a number of important and unique advantages over other
  215.     scanners. These are:
  216.  
  217.         TbScanX is fully network compatible. It does not require you to
  218.         reload the scanner after logging on to the network. Other
  219.         resident anti-virus utilities force you to choose between
  220.         protection before the network is started, or protection after
  221.         the network is started, but not both.
  222.  
  223.         TbScanX can display its messages in your local language.
  224.  
  225.         TbScanX offers the flexibility of a data file that can be edited
  226.         quickly.
  227.  
  228.         As new viruses spread quickly there is often no time available
  229.         to continually adapt your own virus checker in order to make it
  230.         capable of recognizing each new virus as it appears. That is
  231.         why TbScanX uses a separate data file listing the signatures of
  232.         all known viruses. This file can be adapted quickly, possibly
  233.         by yourself. TbScanX supports, among others, the format which is
  234.         used in the file VIRSCAN.DAT.  This file is regularly updated
  235.         and can be obtained through a lot of data banks.
  236.  
  237.         TbScanX supports wildcards in the signature. Many viruses are
  238.  
  239.  
  240.  
  241.                                      Page 3
  242.  
  243.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  244.  
  245.  
  246.         adapted and converted versions of existing viruses. Such a
  247.         modified virus - a mutant - is similar to the original virus,
  248.         but that part of the virus program which contains the signature
  249.         has often been changed. Most scanners will fail to recognize
  250.         the mutant unless the new signature has been incorporated into
  251.         the scanning program. TbScanX has been designed to approach this
  252.         problem differently: by replacing the modified parts of the
  253.         signature with wildcards TbScanX can still recognize mutant
  254.         virus activities. Hence all mutant versions of, for instance,
  255.         the Jerusalem/PLO virus can be discovered by TbScanX through
  256.         just one signature instead of the, say, 25 that several other
  257.         virus scanners require. This also explains why TbScanX uses
  258.         'only' 300 signatures but still detects all 800 viruses known.
  259.  
  260.         TbScanX offers other software a universal hook to scan data
  261.         for viruses.  If you are a programmer, you can instruct your
  262.         programs to scan information read from disk for viruses before
  263.         using the data.
  264.  
  265.         TbScanX does not use much memory compared to other resident
  266.         virus scanners. On almost every machine it should be possible
  267.         to configure TbScanX that it uses only 1Kb of memory. Of course
  268.         you can also load this kilobyte into upper memory.
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.                                      Page 4
  302.  
  303.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  304.  
  305.  
  306. 2.  USAGE OF THE PROGRAM
  307.  
  308.  
  309.   2.1.  System requirements
  310.  
  311.     TbScanX runs perfectly on standard machines, in line with our
  312.     philosophy that there should be a limit to limitations.
  313.  
  314.     +   TbScanX can be executed under DOS version 3.00 (and all later
  315.         versions). However, Dos 5.0 or higher is recommended, since
  316.         TbScanX has been optimized and designed primarily for use with
  317.         these DOS versions.
  318.  
  319.     +   TbScanX requires about 10 Kb of free memory to be invoked. If
  320.         you enable swapping it does NOT require additional standard DOS
  321.         memory to initialise itself. If you don't enable swapping the
  322.         amount of memory depends on the amount of signatures in the
  323.         data file. TbScanX can handle up to approximately 2500
  324.         signatures, depending on which swapping mode is used. Without
  325.         swapping mode TbScanX can utilize up to 50Kb, when swapping to
  326.         expanded memory 64Kb, when swapping to extended memory 50Kb,
  327.         when swapping to Hercules memory 28Kb, and when swapping to
  328.         CGA/EGA/VGA memory 24Kb.
  329.  
  330.     +   The size of the signature file should not exceed 2Mb.
  331.  
  332.  
  333.   2.2.  Program invocation
  334.  
  335.     It is recommended to invoke TbScanX automatically from within your
  336.     Config.Sys or Autoexec.Bat file. It is important to invoke TbScanX
  337.     as early as possible after the machine has booted. For that reason
  338.     it is possible to invoke TbScanX from within the Config.Sys file.
  339.  
  340.     TbScanX requires TbDriver to be loaded first!
  341.  
  342.     TbScanX is easy to use. The syntax is as follows:
  343.             TBSCANX [<options>]...
  344.  
  345.     There are three possible ways to invoke TbScanX:
  346.  
  347.     To invoke TbScanX from the DOS prompt or within the Autoexec.Bat
  348.     file:
  349.             <path>TbScanX
  350.  
  351.     To invoke TbScanX from the Config.Sys as a TSR (Dos 4+):
  352.             Install=<path>TbScanX.Exe
  353.  
  354.     To invoke TbScanX from the Config.Sys as a device driver:
  355.             Device=<path>TbScanX.Exe
  356.  
  357.     TbScanX should always work correctly after being started from
  358.  
  359.  
  360.  
  361.                                      Page 5
  362.  
  363.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  364.  
  365.  
  366.     within the Autoexec.Bat. The "Install=" Config.Sys command is
  367.     NOT available in DOS 3.xx.
  368.     In addition to the three invocation possibilities DOS 5 users can
  369.     "highload" TbScanX in an UMB (upper memory block) if it is
  370.     available:
  371.             LoadHigh <path>TbScanX.Exe
  372.     Within the Config.Sys file TbScanX can also be loaded high:
  373.             DeviceHigh=<path>TbScanX.Exe
  374.  
  375.    2.2.1.  Invocation in Config.Sys
  376.  
  377.     -> Invoking TbScanX as a device driver does not work in all OEM
  378.        versions of DOS. You have to try it, if it doesn't work use the
  379.        "Install=" command or load TbScanX from within the Autoexec.Bat.
  380.  
  381.    2.2.2.  Invocation in network environment
  382.  
  383.     -> Unlike other anti-virus products, the Thunderbyte anti-virus
  384.        utlities can be loaded before the network is started without
  385.        loosing the protection after the network is started.
  386.  
  387.    2.2.3.  Invocation when using MS-Windows
  388.  
  389.     -> Windows users should invoke TbScanX BEFORE starting Windows.
  390.        If you do that there is only one copy of TbScanX in memory, but
  391.        every DOS-window will nevertheless have a fully functional
  392.        TbScanX in it.  TbScanX detects if Windows is starting up, and
  393.        will switch itself in multitasking mode if necessary. You can
  394.        even disable TbScanX in one window without affecting the
  395.        functionality in another window.
  396.  
  397.  
  398.   2.3.  While scanning
  399.  
  400.     Whenever a program tries to write to an executable file (files with
  401.     the extensions .COM and .EXE), you will shortly see the text
  402.     "*Scanning*" in the upper left corner of your screen.  As long as
  403.     TbScanX is scanning this text will appear. Since TbScanX takes very
  404.     little time to scan the file, the message will only appear shortly.
  405.     The text "*Scanning*" will also appear if you execute a program
  406.     directly from a diskette, and if DOS accesses the bootsector of a
  407.     diskette drive.
  408.  
  409.  
  410.   2.4.  Detecting viruses
  411.  
  412.     If TbScanX detects a signature going to be written into a file,
  413.     a popup window will appear with the message:
  414.  
  415.         WARNING, <filename> contains <virus name>!
  416.         Abort? (Y/n)
  417.  
  418.  
  419.  
  420.  
  421.                                      Page 6
  422.  
  423.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  424.  
  425.  
  426.     Press "N" to continue, press any other key to abort.
  427.  
  428.     If TbScanX detects a signature in a boot sector, it will display the
  429.     message:
  430.  
  431.         WARNING, Disk in <drive> contains <virus name>!
  432.         Press a key...
  433.  
  434.     Although a virus seems to be on the bootsector of the specified
  435.     drive, the virus can not do anything since it has not been executed
  436.     yet.  However, if you reboot the machine with the contaminated
  437.     diskette in the drive, the virus will copy itself to your harddisk.
  438.  
  439.     To display the name of the virus, TbScanX needs the signature file
  440.     again.  It will automatically use the signature file that was used
  441.     when you invoked the program.  If the signature file is missing
  442.     (because you deleted it, or because you removed the floppy with
  443.     it), or no file handles are left, TbScanX will still detect
  444.     viruses, but it is no longer able to display the name of the virus.
  445.     It will display [Name unknown] instead.
  446.  
  447.  
  448.   2.5.  Testing for viruses
  449.  
  450.     Although TbScanX detects viruses automatically when you try to
  451.     create or modify an executable file, it can be handy to force
  452.     TbScanX to test a specific file for viruses. TbScanX has created a
  453.     character device with the name "SCANX" while installing itself in
  454.     memory. When you send data to this device the data will be scanned
  455.     for the occurences of viruses. Try this:
  456.  
  457.         copy /b testvir.com scanx
  458.  
  459.     No file will be created with the name "scanx" but the input (the
  460.     contents of the file "testvir.com") will be scanned for viruses.
  461.     This way you can easy inspect any file (also the non-executables)
  462.     for the existence of virus signatures without the need to invoke a
  463.     special program. If the device "scanx" detects a signature in the
  464.     input it will simulate a DOS "write protect error".
  465.  
  466.     Note that you have to specify the "/b" option.  Otherwise DOS will
  467.     send the characters to the device one by one. This consumes a lot
  468.     of time and of course, no viruses will be found in one byte
  469.     sequences!
  470.  
  471.  
  472.   2.6.  Command line options
  473.  
  474.     It is possible to specify options on the command line. The upper
  475.     four options are always available, the other options are only
  476.     available if TbScanX is not already resident in memory.
  477.  
  478.  
  479.  
  480.  
  481.                                      Page 7
  482.  
  483.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  484.  
  485.  
  486.     optionword   short  explanation
  487.     ----------   ----- -------------------------------------
  488.  
  489.         help       ?   =display this helpscreen
  490.         off        d   =disable scanning
  491.         on         e   =enable scanning
  492.         remove     r   =remove TbScanX from memory
  493.  
  494.         compatx    c   =use alternate interrupt
  495.         noexec     n   =never scan at execute
  496.         allexec    a   =always scan at execute
  497.         noboot     b   =do not scan bootsectors
  498.         ems        me  =use expanded memory (EMS)
  499.         xms        mx  =use extended memory (XMS)
  500.         herchalf   mh  =use Hercules-half memory
  501.         hercfull   mf  =use Hercules-full memory
  502.         cga        mc  =use CGA/EGA/VGA memory
  503.         secure     s   =deny access without asking
  504.         lock       l   =lock PC when virus detected
  505.         verbose    v   =show comment and memory report
  506.         valid      u   =unauthorized signatures allowed
  507.  
  508.  
  509.    2.6.1.  help (?)
  510.  
  511.     If you specify this option TbScanX will show you the brief help as
  512.     shown above. Once TbScanX has been loaded the help option will not
  513.     show all options anymore.
  514.  
  515.    2.6.2.  off (d)
  516.  
  517.     If you specify this option TbScanX will be disabled, but it will
  518.     remain in memory.
  519.  
  520.    2.6.3.  on (e)
  521.  
  522.     If you use this option TbScanX will be activated again after you
  523.     disabled it with the 'off' option.
  524.  
  525.    2.6.4.  remove (r)
  526.  
  527.     This option can be used to remove the resident part of TbScanX from
  528.     your memory.  All memory used by TbScanX will be released.
  529.     Unfortunately, the removing of a TSR (like TbScanX) is not always
  530.     possible.  TbScanX checks whether it is safe to remove the resident
  531.     part from memory, if it is not safe it just disables TbScanX. A TSR
  532.     can not be removed if another TSR is started after it.  If this
  533.     happens with TbScanX it will completely disable itself. The
  534.     character device "SCANX" will disappear also.
  535.  
  536.    2.6.5.  compatx (c)
  537.  
  538.  
  539.  
  540.  
  541.                                      Page 8
  542.  
  543.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  544.  
  545.  
  546.     In most systems TbScanX performs very well. It is however possible
  547.     that another TSR program conflicts with TbScanX. If the other TSR
  548.     is loaded first, TbScanX will normally detect the conflict and use
  549.     an alternate interrupt. If the other TSR is loaded after TbScanX,
  550.     and it does abort with a message telling you that it has already
  551.     been loaded, you can use the 'compatx' switch of TbScanX
  552.     (when installing it in memory).
  553.  
  554.    2.6.6.  data (df)
  555.  
  556.     You can override the default path and name of the signature file by
  557.     using this option.
  558.  
  559.     TbScanX normally tries to locate a signature file by itself. See
  560.     chapter 3.10 for information on how TbScan searches such a data
  561.     file. If TbScanX does not succeed in recognizing or locating the
  562.     default data file, or if you want to override TbScanX's default data
  563.     search path, you should use the 'data' option.
  564.  
  565.    2.6.7.  noexec (n)
  566.  
  567.     TbScanX normally scans files located on removable media just before
  568.     they are executed.  If you don't like that you can use this option
  569.     to disable this feature completely.
  570.  
  571.    2.6.8.  allexec (a)
  572.  
  573.     TbScanX normally scans files to be executed only if they reside on
  574.     removable media. Files on the harddisk are trusted, because files
  575.     on the harddisk have to be copied or downloaded before they can
  576.     exist on your disk. And by that time TbScanX already scanned them
  577.     automatically. But if you also like every file to be scanned before
  578.     it will be executed, no matter whether they reside on harddisk or
  579.     removable media, you should use this option.
  580.  
  581.    2.6.9.  noboot (b)
  582.  
  583.     TbScanX monitors the disk system:  every time the bootsector is
  584.     being read, TbScanX automatically scans it for bootsector viruses.
  585.     If you change a disk, the first thing DOS has to do is read the
  586.     bootsector, otherwise it does not know what kind of disk is in the
  587.     drive. And as soon as DOS reads the bootsector, TbScanX checks it
  588.     for viruses.  If you don't like this feature, or if it causes
  589.     problems, you can switch it off using the 'noboot' option. If
  590.     you specify this option TbScanX will also require less memory,
  591.     because the bootsector signatures will not be stored in memory.
  592.  
  593.    2.6.10.  valid (u)
  594.  
  595.     TbScanX checks the signature file for modifications.  If you change
  596.     the contents of that file TbScanX will issue a warning.  If you
  597.     don't want the warning to be displayed, use the 'valid' option.
  598.  
  599.  
  600.  
  601.                                      Page 9
  602.  
  603.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  604.  
  605.  
  606.    2.6.11.  secure (s)
  607.  
  608.     TbScanX normally asks the user to continue or to cancel when it
  609.     detects a virus. In some business environments however this choice 
  610.     should not be made by employees.  By using option 'secure' it is no 
  611.     longer possible to allow suspicious operations.
  612.  
  613.    2.6.12.  lock (l)
  614.  
  615.     If you are a system operator, you can use this option to instruct
  616.     TbScanX to lock the system once a virus is detected.
  617.  
  618.    2.6.13.  verbose (v)
  619.  
  620.     If you specify this option TbScanX displays data file comments and
  621.     the memory report when installing itself resident in memory.
  622.  
  623.    2.6.14.  ems (me)
  624.  
  625.     If you specify this option TbScanX will use expanded memory (like
  626.     provided by LIM/EMS expansion boards or 80386 memory managers) to
  627.     store the signatures and part of its program code.  Expanded memory
  628.     is allocated in 16Kb blocks, so the minimum amount of expanded
  629.     memory allocated is 16Kb.  However, conventional memory is more
  630.     valuable to your programs than expanded memory, so use of this
  631.     option is recommended. TbScanX can use up to 64Kb of EMS memory.
  632.  
  633.    2.6.15.  xms (mx)
  634.  
  635.     If you specify this option TbScanX will use extended memory to
  636.     store the signatures and part of its program code. An XMS driver
  637.     (like HIMEM.SYS) needs to be installed to be able to use this
  638.     option.  XMS memory is not directly accessable from within DOS, so
  639.     every time TbScanX has to scan data it has to copy the signatures
  640.     to conventional memory.  To be able to save the original memory
  641.     contents TbScanX needs a double amount of XMS memory. Swapping to
  642.     XMS is slower than swapping to EMS memory, so if you have EMS
  643.     memory available swapping to EMS is recommended. It is possible
  644.     that swapping to XMS conflicts with some other software, so if you
  645.     experience problems try using TbScanX without the XMS option.
  646.     TbScanX can use about 2*50Kb of extended memory.
  647.  
  648.    2.6.16.  herchalf (mh)
  649.  
  650.     If you specify this parameter TbScanX will use some part of the
  651.     Hercules videomemory to store the signatures.  As long as the
  652.     video card remains in the text mode it uses only a little part of
  653.     its video memory. The rest can be used by... TbScanX. Video memory
  654.     is very slow, so also TbScanX will slowdown somewhat. If you
  655.     execute a program that switches the card into the graphics mode
  656.     TbScanX will disable itself completely. You can re-activate TbScanX
  657.     by running it again.  It will automatically remove the old resident
  658.  
  659.  
  660.  
  661.                                     Page 10
  662.  
  663.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  664.  
  665.  
  666.     part of TbScanX that might be left in memory. TbScanX can use up to
  667.     28Kb of Hercules memory.
  668.  
  669.    2.6.17.  hercfull (mf)
  670.  
  671.     This parameter does the same as the 'herchalf' parameter, but it
  672.     will switch the Hercules card into the full mode. TbScanX then uses
  673.     video memory that will not be used by even most of the graphics
  674.     software.  You can run a graphics program while TbScanX remains
  675.     active at the same time!  But watch out! If you have two
  676.     videocards in your machine at the same time, DO NOT USE this
  677.     option!
  678.  
  679.    2.6.18.  cga (mc)
  680.  
  681.     This parameter does the same as the 'herchalf' or 'hercfull' option,
  682.     but it will now use CGA/EGA/VGA video memory instead of Hercules
  683.     memory. TbScanX can use up to 24Kb of video memory.
  684.  
  685.  
  686.   2.7.  Examples:
  687.  
  688.         C:\utils\TbScanX C:\tb\TbScan.Dat ems
  689.     or:
  690.         Device=C:\utils\TbScanX.Exe C:\tb\TbScan.Dat xms noboot
  691.  
  692.  
  693.   2.8.  Residence of the signature file
  694.  
  695.     TbScanX looks for the data file in the following order:
  696.  
  697.     1)  If a filename is specified on the command line, it will use
  698.         the file specified on the command line.
  699.     2)  It searches for a file with the name VIRSCAN.DAT in the active
  700.         directory.
  701.     3)  It searches for VIRSCAN.DAT in the same directory where the
  702.         program file TBSCANX.EXE itself resides.
  703.     4)  It searches for a file with the name TBSCAN.DAT in the active
  704.         directory.
  705.     5)  It searches for TBSCAN.DAT in the same directory where the
  706.         program file TBSCANX.EXE itself resides.
  707.  
  708.  
  709.   2.9.  Error messages
  710.  
  711.     Error messages that might be displayed:
  712.  
  713.     -   TbDriver not active. Load TbDriver first!
  714.         TbScanX needs TbDriver, so you have to load TbDriver first.
  715.  
  716.     -   TbDriver version is not <version>.
  717.         The version of TbDriver found in memory does not match the
  718.  
  719.  
  720.  
  721.                                     Page 11
  722.  
  723.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  724.  
  725.  
  726.         version number of TbScanX. Make sure you do not mix version
  727.         numbers!
  728.  
  729.     -   Error in data file at line <number>.
  730.         There is an error in the specified line of the data file.
  731.  
  732.     -   Not enough memory
  733.         There is not enough free memory to process the data file. Try
  734.         to enable swapping, or if you are already doing so, try another
  735.         swapping mode. See also chapter "limitations".
  736.  
  737.     -   Data file not found.
  738.         TbScanX has not been able to locate the data file.
  739.  
  740.     -   This version of TbScanX requires a <typeID> processor.
  741.         You are using a processor optimized version of TbScanX and
  742.         it can not be executed by the current processor.
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.                                     Page 12
  782.  
  783.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  784.  
  785.  
  786. 3.  CONSIDERATIONS AND RECOMMENDATIONS
  787.  
  788.  
  789.   3.1.  Solving incompatibility problems.
  790.  
  791.     Although TbScanX has been designed to cooperate with other resident
  792.     software, other software may not, causing system errors or worse.
  793.  
  794.     The most common problems:
  795.  
  796.     Problem:
  797.         If TbScanX tries to display a message, the text 'message file
  798.         <filename> could not be opened' appears.
  799.  
  800.     Solution:
  801.         Specify the FULL path and filename of the file that you will
  802.         use as message file after the TbDriver invocation. The default
  803.         filename is TbDriver.Lng
  804.  
  805.     Problem:
  806.         You are running a network. TbScanX is installed succesfully,
  807.         but it does not display the "*scanning*" message while
  808.         accessing files.  It also does not detect viruses.
  809.  
  810.     Solution:
  811.         Use the command 'TbDriver net' after the network has been
  812.         loaded.
  813.  
  814.     Problem:
  815.         It is impossible to start a TSR after TbScanX has been loaded.
  816.         The TSR software reports that it already has been loaded in
  817.         memory, which is not true.
  818.  
  819.     Solution:
  820.         Use the 'compatx' switch of TbScanX while loading it. The TSR
  821.         and TbScanX are using the same multiplex interrupt call.
  822.  
  823.     Problem:
  824.         The system sometimes hangs when the message "*scanning*" is on
  825.         the screen. The problem however is hard to reproduce.
  826.  
  827.     Solution:
  828.         Try using StackMan. StackMan is supplied in the TBAV package.
  829.  
  830.     Problem:
  831.         The system sometimes hangs when the message "*scanning*" is on
  832.         the screen when using a specific application. The problem can
  833.         be reproduced.
  834.  
  835.     Solution:
  836.         If you are using the 'xms' option, load TbScanX without it.
  837.         If the problem is solved, you should not use the 'xms' option.
  838.  
  839.  
  840.  
  841.                                     Page 13
  842.  
  843.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  844.  
  845.  
  846.         If the problem is not related to the 'xms' option, try using
  847.         StackMan.
  848.  
  849.     Problem:
  850.         Everything works well, but as soon as I load a specific TSR the
  851.         system hangs immediately after the TSR goes resident. The
  852.         TbScanX option 'compatx' does not solve the problem.
  853.  
  854.     Solution:
  855.         Use StackMan with the -dos option and try again.
  856.  
  857.  
  858.   3.2.  Reducing the memory requirements.
  859.  
  860.     Most PC users try to maintain as much free DOS memory as possible.
  861.     TbScanX is designed to use only a little amount of DOS memory. To
  862.     decrease the memory requirements of TbScanX even further do the
  863.     following:
  864.  
  865.     -   Load TbScanX from within the Config.Sys file. If loaded as a
  866.         device driver TbScanX has no Program Segment Prefix (PSP),
  867.         and that saves 256 bytes.
  868.  
  869.     -   If you invoke TbScanX from within the Autoexec.Bat file do this
  870.         before establishing environment variables. DOS maintains a list
  871.         of environment variables for every resident program, so keep
  872.         this list small while installing TSRs. Once all TSRs are
  873.         installed you can define all environment variables without
  874.         affecting the memory requirements of the TSRs.
  875.  
  876.     -   Use swapping. By using one of the options 'ems', 'xms', 'cga',
  877.         'hercfull' or 'herchalf' TbScanX swaps itself to non-DOS memory,
  878.         leaving only 1 Kb of code in DOS memory. Swapping to expanded
  879.         memory ('ems') is preferred.
  880.  
  881.     -   If you have DOS 5 or higher try to load TbScanX into an upper
  882.         memory block using the "loadhigh" or "devicehigh" commands. It
  883.         is recommended to enable swapping also to limit the usage of
  884.         upper memory. A "hole" of 10Kb should be sufficient to load
  885.         TbScanX into upper memory while using one of the swapping modes
  886.         except 'xms'. If you don't use swapping TbScanX also needs
  887.         memory to store the signatures. If you enable XMS swapping
  888.         TbScanX needs to build the data structures in normal memory
  889.         before copying them to XMS. This causes TbScanX to require
  890.         additional memory at initialization time. You can also combine
  891.         the 'xms' option with one of the other swapping options. In that
  892.         case TbScanX will finally use 'xms' as swapping memory, but
  893.         while initialising TbScanX uses the other swapping mode,
  894.         enabling you to load TbScanX into an upper memory "hole" of
  895.         only 10Kb.
  896.  
  897.     -   Use one of the processor specific versions of TbScanX. They all
  898.  
  899.  
  900.  
  901.                                     Page 14
  902.  
  903.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  904.  
  905.  
  906.         consume less memory than the generic version of TbScanX.
  907.         Processor optimized versions are available on any Thunderbyte
  908.         support BBS.
  909.  
  910.     -   To minimize the signature data you can consider to specify the
  911.         'noboot' option. In this case TbScanX does not maintain data for
  912.         viruses with only the BOOT keyword set.
  913.  
  914.     -   Finally you can edit the data file, deleting the less widely
  915.         spread viruses and truncating the remaining signatures. Of
  916.         course we don't recommend this but if memory is tight it might
  917.         be the only solution.
  918.  
  919.  
  920.   3.3.  How many viruses does it detect?
  921.  
  922.     Some people think that TbScanX recognizes only 500 viruses, based
  923.     upon the fact that the signature file contains only 500 signatures.
  924.     What they do not realise is that the signatures are family
  925.     signatures, which means that each signature covers many viruses.
  926.     For instance, our PLO/Jerusalem signature detects over 25 viruses
  927.     which are all related to the 'original' Jerusalem virus! Only one
  928.     (wildcarded) signature is needed by TbScanX to cover all these
  929.     mutants.
  930.  
  931.     Some competitive products treat each virus mutant as a separate
  932.     virus, and so claim to detect over 1200 viruses. However, TbScanX
  933.     detects even more viruses using 'only' 500 signatures.
  934.  
  935.  
  936.   3.4.  Testing the scanner
  937.  
  938.     Many people understandably wish to test the product they are using.
  939.     While it is very easy to test, for instance, a word processor, it
  940.     is very difficult to test a smart scanner like TbScanX. You cannot
  941.     extract 25 bytes from an executable and insert it into the
  942.     TBSCAN.DAT or VIRSCAN.DAT data file as a bogus signature just to
  943.     find out whether or not TbScan will detect the 'signature' in the
  944.     file it was copied from.  It is very likely that TbScanX will NOT
  945.     find it because it only scans the entry-area of the file whereas
  946.     the 'signature' you extracted might be taken from some other
  947.     location within the file.
  948.  
  949.     You might ask: 'How then can I test the scanner if using a 'test
  950.     signature' does not work?' We think you can't, unless you are an
  951.     experienced assembler programmer.  Sorry, but testing a
  952.     disassembling scanner should be performed by virus experts only.
  953.     Fortunately, you don't have to rely on our tests solely.  There are
  954.     anti-virus magazines that regularly publish tests of all virus
  955.     scanners.  At the end of this manual you will find names and
  956.     addresses of such magazines.  Anyway, third parties have tested our
  957.     scanner along with several others, and they found TbScanX to have a
  958.  
  959.  
  960.  
  961.                                     Page 15
  962.  
  963.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  964.  
  965.  
  966.     very high hit rate. It detects even more viruses than many popular
  967.     scanners do.
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.                                     Page 16
  1022.  
  1023.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  1024.  
  1025.  
  1026. 4.  APPLICATION INTERFACE
  1027.  
  1028.  
  1029.     If you are a software developer you can use TbScanX to check data
  1030.     for viruses. A program can perform a self-check as soon as it is
  1031.     invoked by sending its code to TbScanX. A program that processes
  1032.     other programs or parts of it (for example encryptors or executable
  1033.     file compressors) should check the data for viruses before
  1034.     processing it.
  1035.  
  1036.   4.1.  High-level control
  1037.  
  1038.     This method is most usefull for the high level programming
  1039.     languages and languages that lack the ability to generate
  1040.     interrupts.
  1041.  
  1042.     Try to open the file "SCANX".  If this file exists TBSCANX is
  1043.     installed in the machine. Open the file in the binairy mode.  Write
  1044.     the data to be scanned to the opened file.  If the data contains a
  1045.     signature of a virus TbScanX simulates a DOS "write protect error".
  1046.     If nothing happens and the data is accepted no signature could be
  1047.     found in it.
  1048.  
  1049.   4.2.  Low-level control
  1050.  
  1051.     This method is more complex, but offers more possibilities. If your
  1052.     programming language supports issuing interrups you should be able
  1053.     to use this method.
  1054.  
  1055.     The interface consists of some multiplex calls (int 2Fh). Register
  1056.     AH should contain CAh.  Register AL contains the function request
  1057.     number.
  1058.  
  1059.     On the Thunderbyte support BBS you will find additional information,
  1060.     examples and libraries.
  1061.  
  1062.  
  1063.     Supported function requests:
  1064.  
  1065.  
  1066.     AL=0    InstallationCheck
  1067.  
  1068.         Return value:
  1069.         AL=0    TbScanX not installed
  1070.         AL=FFh  TbScanX installed
  1071.  
  1072.         If BX was 'TB' then it is now changed into 'tb'.
  1073.  
  1074.  
  1075.     AL=1    GetStatus
  1076.  
  1077.         Return value:
  1078.  
  1079.  
  1080.  
  1081.                                     Page 17
  1082.  
  1083.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  1084.  
  1085.  
  1086.         AH      Version number TbScanX in BCD. (CAh if version < 2.2)
  1087.         AL=0    TbScanX disabled
  1088.         AL=1    TbScanX enabled
  1089.         BX      Segment swap area. Zero if not swapped.
  1090.         CX      Number of signatures that will be searched.
  1091.         DX      EMS_Handle. -1 if no expanded memory in use.
  1092.                 If DX is not equal to -1 but BX contains zero then
  1093.                 TbScanX uses XMS swapping. DX contains the XMS handle
  1094.                 in that case.
  1095.  
  1096.  
  1097.     AL=2    SetStatus
  1098.  
  1099.         BL=0    Disable TbScanX
  1100.         BL=1    Enable TbScanX
  1101.  
  1102.         Return value:
  1103.         NONE
  1104.  
  1105.  
  1106.     AL=3    ScanBuffer
  1107.  
  1108.         DS:DX   Address of buffer to scan.
  1109.         CX      Length of buffer to scan.
  1110.  
  1111.         Return value:
  1112.         No Carry flag set       No signatures found in buffer.
  1113.         Carry:                  Signature found in buffer!
  1114.                 ES:BX   ASCIIZ-name of virus (null terminated)
  1115.  
  1116.         Registers altered:
  1117.         AX,BX,CX,DX,ES
  1118.         The contents of the buffer remains unchanged.
  1119.  
  1120.  
  1121.     AL=4    ScanFile
  1122.  
  1123.         DS:DX   Name of the program file to be scanned.
  1124.  
  1125.         WARNING! There should be at least 4 Kb of free memory to
  1126.         perform this function!
  1127.  
  1128.         Return value:
  1129.         No Carry flag set       No signature found in file.
  1130.         Carry:                  Signature found in buffer!
  1131.                 ES:BX   ASCIIZ-name of virus (null terminated)
  1132.  
  1133.         Registers altered:
  1134.         AX,BX,CX,DX,ES
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.                                     Page 18
  1142.  
  1143.  Thunderbyte resident virus scanner. (C) 1989-1992 Thunderbyte B.V.
  1144.  
  1145.  
  1146.    Assembler example:
  1147.  
  1148.         mov ah,0CAh             ;Multiplex number
  1149.         mov al,0
  1150.         int 02Fh                ;Installation check
  1151.         cmp al,0FFh             ;If AL=FFh TbScanX has been installed.
  1152.         jne notinstalled        ;Else TbScanX has not been installed.
  1153.  
  1154.         lea dx,buffer           ;Address of the buffer in DS:DX
  1155.         mov cx,512              ;Length of our buffer
  1156.         mov ah,0CAh             ;Multiplex number
  1157.         mov al,3
  1158.         int 02Fh                ;ScanBuffer
  1159.         jnc notinfected         ;No carry? Then no virus found!
  1160.  
  1161.         call print              ;Virus found. Print name ES:BX
  1162.  
  1163.     notinfected:
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.                                     Page 19